package com.smedi.ismedi.authoritymanagement.core.domain.repository;

import com.smedi.ismedi.authoritymanagement.core.domain.aggregatemodel.RoleAssignment;
import com.smedi.ismedi.authoritymanagement.core.domain.aggregatemodel.RoleMember;
import com.smedi.ismedi.authoritymanagement.core.domain.dto.RoleAssignmentQuery;

import java.util.List;

/**
 * @Author: xulinjun
 * @Date: 2021-7-13 19:42
 */
public interface RoleMemberRepository {
    int selectCountByRoleIdAndPersonId(Long roleId, Long personId);

    RoleMember doInsert(RoleMember data);

    void doDeleteByRoleMemberId(Long roleMemberId);

    RoleMember selectByRoleMemberId(Long roleMemberId);

    int selectCountByRoleId(Long roleId);

    List<RoleMember> selectRoleMemberByPersonId(Long personId);

    List<RoleMember> selectRoleMemberByRoleId(Long roleId);

    List<RoleMember> selectRoleMemberByRoleId(List<Long> roleIds);

    List<RoleAssignment> getRoleAssignmentList(RoleAssignmentQuery roleAssignmentQuery);

    List<RoleAssignment> getRoleAssignmentListWithoutToken(RoleAssignmentQuery roleAssignmentQuery);
}
